<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:a4j="http://richfaces.org/a4j"
				xmlns:rich="http://richfaces.org/rich"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:t="http://myfaces.apache.org/tomahawk"
				template="/pages/crud_template.xhtml"> 

	<ui:param name="crudBean" value="#{movimentacaoRecebimentosBean}" />
	
	<ui:define name="saveStateObjectsDefined">
		<t:saveState value="#{crudBean.listaRedeAdquirentes}" />
		<t:saveState value="#{crudBean.listaEstLojas}" />
		<t:saveState value="#{crudBean.listaBandeiras}" />
		<t:saveState value="#{crudBean.listaProdutos}" />
		<t:saveState value="#{crudBean.listaMovimentoRecebimentosPorDataCredito}" />
		<t:saveState value="#{crudBean.listaMovimentoRecebimentosAgendaFinanceira}" />
		<t:saveState value="#{crudBean.listaParcelasPagas}" />
	</ui:define>
	
	<ui:define name="requiredFieldsMessage">
		<h:outputText value="#{bundle.todosCamposObrigatorios}" rendered="#{crudBean.searching}"/>
	</ui:define>
	
	<ui:define name="content">
		<!-- Painel de Pesquisa - Inicio -->
		<h:panelGroup id="panelGroupDePesquisa" rendered="#{crudBean.searching}">
			<f:subview id="viewBusca">
				<table>
					<tr>
						<td class="tdCor"><h:outputText value="#{bundle.lbl_periodo_pagamento}"/> *</td>
						<td class="tdBranco">
							<rich:calendar value="#{crudBean.searchObject.filtro.dataPagamentoInicial}" datePattern="dd/MM/yyyy" cellWidth="24px" cellHeight="22px" style="width:200px" showWeeksBar="false" inputSize="10" converter="dataConverter" oninputkeypress="formataData(this, event);" maxlength="10" onkeypress="soNumero(this);" enableManualInput="true"/>
							<h:outputText value=" #{bundle.lbl_ate} "/>
							<rich:calendar value="#{crudBean.searchObject.filtro.dataPagamentoFinal}" datePattern="dd/MM/yyyy" cellWidth="24px" cellHeight="22px" style="width:200px" showWeeksBar="false" inputSize="10" converter="dataConverter" oninputkeypress="formataData(this, event);" maxlength="10" onkeypress="soNumero(this);" enableManualInput="true"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="20%"><h:outputText value="#{bundle.lbl_rede_adquirente}"/></td>
						<td class="tdBranco">
							<h:selectOneMenu rendered="#{crudBean.exibirListaRedesAdquirentes}" value="#{crudBean.searchObject.redeAdquirenteVo.codigo}" converter="simpleIndexConverter">
    							<t:selectItems var="o" itemValue="#{o.codigo}" itemLabel="#{o.descricao}" value="#{crudBean.listaRedeAdquirentes}" />
    						</h:selectOneMenu>
							<h:outputText rendered="#{!crudBean.exibirListaRedesAdquirentes}" value=" #{crudBean.searchObject.redeAdquirenteVo.descricao} "/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="20%"><h:outputText value="#{bundle.lbl_loja}"/></td>
						<td class="tdBranco">
							<h:selectOneMenu rendered="#{crudBean.exibirListaLojas}" value="#{crudBean.searchObject.filtro.estLoja}" converter="simpleIndexConverter">
    							<t:selectItems var="o" itemValue="#{o.codigo}" itemLabel="#{o.descricao}" value="#{crudBean.listaEstLojas}" />
    						</h:selectOneMenu>
							<h:outputText rendered="#{!crudBean.exibirListaLojas }" value=" #{crudBean.searchObject.filtro.nomeEstLoja} "/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="25%"><h:outputText value="#{bundle.lbl_bandeira}"/></td>
						<td class="tdBranco">
							<h:selectOneMenu value="#{crudBean.searchObject.bandeiraVo.codigo}" converter="simpleIndexConverter">
    							<t:selectItems var="o" itemValue="#{o.codigo}" itemLabel="#{o.descricao}" value="#{crudBean.listaBandeiras}" />
								<a4j:support event="onchange" reRender="panelGroupDePesquisa" actionListener="#{crudBean.setarListaProdutos}"/>
    						</h:selectOneMenu>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="25%"><h:outputText value="#{bundle.lbl_produto}"/></td>
						<td class="tdBranco">
							<h:selectOneMenu value="#{crudBean.searchObject.produtoVo.codigo}" converter="simpleIndexConverter">
    							<t:selectItems var="o" itemValue="#{o.codigo}" itemLabel="#{o.descricao}" value="#{crudBean.listaProdutos}" />
    						</h:selectOneMenu>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="25%"><h:outputText value="#{bundle.lbl_natureza_produto}"/></td>
						<td class="tdBranco">
							<table style="width: 200px;">
     		 					<tr>
     		 						<td>
										<h:selectOneRadio value="#{crudBean.searchObject.produtoVo.natureza}">
										   <f:selectItem itemValue="0" itemLabel="#{bundle.lbl_todos}"/>   
										   <f:selectItem itemValue="1" itemLabel="#{bundle.lbl_debito}"/>   
										   <f:selectItem itemValue="2" itemLabel="#{bundle.lbl_credito}"/>   
										</h:selectOneRadio>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td class="tdCor"><h:outputText value="#{bundle.lbl_visao}" /></td>
						<td class="tdBranco">
							<table style="width: 300px;">
     		 					<tr>
     		 						<td>
										<h:selectOneRadio value="#{crudBean.searchObject.statusVo.codigo}">
										   <f:selectItem itemValue="0" itemLabel="#{bundle.lbl_recebido}"/>   
										   <f:selectItem itemValue="1" itemLabel="#{bundle.lbl_normal}"/>   
										   <f:selectItem itemValue="2" itemLabel="#{bundle.lbl_antecipada}"/>   
										   <f:selectItem itemValue="3" itemLabel="#{bundle.lbl_areceber}"/>   
										</h:selectOneRadio>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</f:subview>
		</h:panelGroup>
		<!-- Painel de Pesquisa - Fim -->


		<!-- Painel de Detalhe 2 (Movimentos Vendas Cupom - Inicio -->
		<h:panelGroup id="panelGroupDeDetalhe3" rendered="#{crudBean.viewingRecebimentos}">
			<f:subview id="viewDetalhe3">
				<table class="tabela">
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_data_Credito}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.dataPagamentoVo.data}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_loja}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.lojaVo.estLojaVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_bandeira}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.bandeiraVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_produto}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.produtoVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_quantidade_parcelas}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.filtro.quantidade}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_valor_total}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.valorBruto}"/>
						</td>
					</tr>
				</table>
			</f:subview>
		</h:panelGroup>
		<!-- Painel de Detalhe 2 (Movimentos Vendas Cupom - Fim -->
		
		<!-- Painel de Detalhe 3 (Movimentos Vendas Cupom - Inicio -->
		<h:panelGroup id="panelGroupDeDetalhe4" rendered="#{crudBean.detailParcelas}">
			<f:subview id="viewDetalhe4">
				<table class="tabela">
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_data_credito}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.dataPagamentoVo.data}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_loja}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.estLojaVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_bandeira}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.bandeiraVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_produto}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.produtoVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_quantidade_parcelas}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.filtro.quantidade}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_valor_total_parcelas}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.valorBruto}"/>
						</td>
					</tr>
				</table>
			</f:subview>
		</h:panelGroup>
		<!-- Painel de Detalhe 3 (Movimentos Vendas Cupom - Fim -->
		
		<!-- Painel de Detalhe 4 (Agenda de Vendas - Inicio -->
		<h:panelGroup id="panelGroupDeDetalhe2" rendered="#{crudBean.agendaFinanceira}">
			<f:subview id="viewDetalhe2">
				<table class="tabela">
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_data_credito}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.dataPagamentoVo.data}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_loja}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.lojaVo.estLojaVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_rede_adquirente}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.redeAdquirenteVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_bandeira}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.bandeiraVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_produto}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.produtoVo.descricao}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_natureza_produto}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{bundle.lbl_all}" rendered="#{crudBean.entity.produtoVo.natureza.valor == 0}" />
							<h:outputText value="#{bundle.lbl_debito}" rendered="#{crudBean.entity.produtoVo.natureza.valor == 1}" />
							<h:outputText value="#{bundle.lbl_credito}" rendered="#{crudBean.entity.produtoVo.natureza.valor == 2}" />
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_quantidade_cupons}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.filtro.quantidade}"/>
						</td>
					</tr>
					<tr>
						<td class="tdCor" width="15%"><h:outputText value="#{bundle.lbl_valor_total}" /></td>
						<td class="tdBranco" width="35%">
							<h:outputText value="#{crudBean.entity.valorBruto}"/>
						</td>
					</tr>
				</table>
			</f:subview>
			
		</h:panelGroup>
		<!-- Painel de Detalhe 4 (Agenda de Vendas - Fim -->
	</ui:define>
	
	<ui:define name="list">
		<h:panelGroup id="panelGroupDeListagem" rendered="#{crudBean.searching}">
			<f:subview id="viewListagem">
				<rich:dataTable id="tblDataTotal" value="#{crudBean.listaMovimentoRecebimentosPorDataCredito}" binding="#{crudBean.tblDataTotal}" var="rst" style="width: 100%;" rowClasses="par,impar">
					  <f:facet name="header">
					    <rich:column style="text-align: center;">
					    	Totais
						</rich:column>
	            		<rich:columnGroup>
							<rich:column style="text-align: center;">
							</rich:column>
							<rich:column style="rich-table-column-right">
									<h:outputText value="#{bundle.lbl_quantidade_parcelas}" />
							</rich:column>
							<rich:column style="rich-table-column-right" >
									<h:outputText value="#{bundle.lbl_valor_bruto}" />
							</rich:column>
							<rich:column style="rich-table-column-right" >
									<h:outputText value="#{bundle.lbl_moeda} " />
									<h:outputText value="#{bundle.lbl_valor_administracao_coluna}" />
							</rich:column>
							<rich:column style="rich-table-column-right" >
									<h:outputText value="#{bundle.lbl_valor_liquido_previsto}" />
							</rich:column>
							<rich:column style="rich-table-column-right" >
									<h:outputText value="#{bundle.lbl_moeda} " />
									<h:outputText value="#{bundle.lbl_valor_antecipacao_coluna}" />
							</rich:column>
							<rich:column style="rich-table-column-right" >
									<h:outputText value="#{bundle.lbl_valor_liquido_pago}" />
							</rich:column>
							<rich:column style="rich-table-column-right" >
									<h:outputText value="#{bundle.lbl_taxa_administracao_coluna}" />
							</rich:column>
							<rich:column style="rich-table-column-right" >
									<h:outputText value="#{bundle.lbl_taxa_antecipacao_coluna}" />
							</rich:column>
            			</rich:columnGroup>
       				</f:facet>
					
					<f:facet name="footer">
                        <rich:columnGroup rendered="#{crudBean.viewingTotal}">
                        	<rich:column style="text-align: center;">
						     	<h:outputText value="#{bundle.lbl_total}" />
				 		    </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.filtro.quantidade}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorBruto}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorPagoAdministracao}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorLiquido}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorPagoAntecipacao}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorPago}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorComissao}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorTaxaAntecipacao}"/>
                            </rich:column>
                        </rich:columnGroup>
                    </f:facet>
				</rich:dataTable>
			
			
			    <br/><br/><br/> 
			
			
				<rich:dataTable id="tblData" value="#{crudBean.listaMovimentoRecebimentosPorDataCredito}" binding="#{crudBean.tblData}" var="rst" style="width: 100%;" rowClasses="par,impar">
					<rich:column style="text-align: center;" sortBy="#{rst.dataPagamento}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_data_credito}" />
						</f:facet>
						<h:outputText value="#{rst.dataPagamento}"/>
					</rich:column>
					<rich:column style="text-align: center;" sortBy="#{rst.redeAdquirente}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_rede_adquirente}" />
						</f:facet>
						<h:outputText value="#{rst.redeAdquirente}"/>
					</rich:column>
					<rich:column style="text-align: center;" sortBy="#{rst.bandeira}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_bandeira}" />
						</f:facet>
						<h:outputText value="#{rst.bandeira}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.quantidade}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_quantidade_parcelas}" />
						</f:facet>
						<h:outputText value="#{rst.quantidade}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.valorTotalBruto}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_valor_bruto}" />
						</f:facet>
						<h:outputText value="#{rst.valorTotalBruto}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.valorTotalAdministracao}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_moeda} " />
							<h:outputText value="#{bundle.lbl_valor_administracao_coluna}" />
						</f:facet>
						<h:outputText value="#{rst.valorTotalAdministracao}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.valorTotalLiquido}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_valor_liquido_previsto}" />
						</f:facet>
						<h:outputText value="#{rst.valorTotalLiquido}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.valorTotalAntecipacao}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_moeda} " />
							<h:outputText value="#{bundle.lbl_valor_antecipacao_coluna}" />
						</f:facet>
						<h:outputText value="#{rst.valorTotalAntecipacao}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.valorTotalPago}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_valor_liquido_pago}" />
						</f:facet>
						<h:outputText value="#{rst.valorTotalPago}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.taxaAdministracao}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_taxa_administracao_coluna}" />
						</f:facet>
						<h:outputText value="#{rst.taxaAdministracao}"/>
					</rich:column>
					<rich:column style="rich-table-column-right" sortBy="#{rst.taxaAntecipacao}">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_taxa_antecipacao_coluna}" />
						</f:facet>
						<h:outputText value="#{rst.taxaAntecipacao}"/>
					</rich:column>
					<rich:column style="text-align: center;">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_agenda}" />
						</f:facet>
						<a4j:commandLink actionListener="#{crudBean.detalharMovimentosRecebimentosAgendaFinanceira}" ajaxSingle="true" reRender="formulario, panelTitle">
							<h:graphicImage value="/imagens/lupa.jpg" height="20" width="20" style="border: 0px;"/>
						</a4j:commandLink>
					</rich:column>
					<rich:column style="text-align: center;">
						<f:facet name="header">
							<h:outputText value="#{bundle.lbl_parcelas}" />
						</f:facet>
						<a4j:commandLink actionListener="#{crudBean.detalharMovimentosRecebimentosParcelasPagas}" ajaxSingle="true" reRender="formulario, panelTitle">
							<h:graphicImage value="/imagens/lupa.jpg" height="20" width="20" style="border: 0px;"/>
						</a4j:commandLink>
					</rich:column>

					<f:facet name="footer">
					   <rich:datascroller for="tblData" maxPages="20" renderIfSinglePage="false"></rich:datascroller>
                    </f:facet>
					
					<f:facet name="footer">
                        <rich:columnGroup rendered="#{crudBean.viewingTotal}">
                            <rich:column></rich:column>
                            <rich:column></rich:column>
                        	<rich:column style="text-align: center;">
						     	<h:outputText value="#{bundle.lbl_total}" />
				 		    </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.filtro.quantidade}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorBruto}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorPagoAdministracao}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorLiquido}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorPagoAntecipacao}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorPago}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorComissao}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                                <h:outputText value="#{crudBean.entity.valorTaxaAntecipacao}"/>
                            </rich:column>
                            <rich:column style="text-align: right;">
                               	<h:outputText value=""/>
                           	</rich:column>
                           	<rich:column style="text-align: right;">
                               	<h:outputText value=""/>
                           	</rich:column>
                        </rich:columnGroup>
                    </f:facet>
					
				</rich:dataTable>
			</f:subview>
		</h:panelGroup>

		<br/>

		<h:panelGroup id="panelGroupCupom" rendered="#{crudBean.detailParcelas}">
			<f:subview id="viewCupom">
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="#{bundle.lbl_parcelas}" />
					</f:facet>
					<rich:dataTable id="tblDataCupom" value="#{crudBean.listaParcelas}" binding="#{crudBean.tblDataParcelasPagas}" var="rstPar" style="width: 100%;" rows="20" rowClasses="par,impar">
						<f:facet name="header">
							<rich:columnGroup>
								<rich:column style="text-align: center;">
									<h:outputText value="#{bundle.lbl_data_venda}" />
								</rich:column>
								<rich:column style="text-align: right;">
									<h:outputText value="#{bundle.lbl_nsu}" />
								</rich:column>
								<rich:column style="text-align: left;">
									<h:outputText value="#{bundle.lbl_autorizacao}" />
								</rich:column>
								<rich:column style="text-align: left;">
									<h:outputText value="#{bundle.lbl_parcela}" />
								</rich:column>
								<rich:column style="text-align: left;">
									<h:outputText value="#{bundle.lbl_plano}" />
								</rich:column>
								<rich:column style="text-align: right;">
									<h:outputText value="#{bundle.lbl_valor_bruto}" />
								</rich:column>
								<rich:column style="width: 19% text-align: right;">
									<h:outputText value="#{bundle.lbl_valor_administracao_coluna}" />
								</rich:column>
								<rich:column style="width: 19% text-align: right;">
									<h:outputText value="#{bundle.lbl_valor_liquido}" />
								</rich:column>
								<rich:column style="width: 19% text-align: right;">
									<h:outputText value="#{bundle.lbl_valor_antecipacao}" />
								</rich:column>
								<rich:column style="width: 19% text-align: right;">
									<h:outputText value="#{bundle.lbl_valor_liquido_pago}" />
								</rich:column>
								<rich:column style="text-align: right;">
									<h:outputText value="#{bundle.lbl_taxa_administracao}" />
								</rich:column>
								<rich:column style="text-align: right;">
									<h:outputText value="#{bundle.lbl_taxa_antecipacao}" />
								</rich:column>
								<rich:column style="width: 19% text-align: center;">
									<h:outputText value="#{bundle.lbl_situacao}" />
								</rich:column>
								<rich:column rendered="#{loginBean.usuarioVo.estEmpresaVo.flagIntegracao.valor == 'YES'}" style="width: 19% text-align: center;">
									<h:outputText value="#{bundle.lbl_dados_cliente}" />
								</rich:column>
							</rich:columnGroup>
						</f:facet>
						
						<rich:column style="text-align: center;">
							<h:outputText value="#{rstPar.dataVenda}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.nsu}"/>
						</rich:column>
						<rich:column style="text-align: left;">
							<h:outputText value="#{rstPar.autorizacao}"/>
						</rich:column>
						<rich:column style="text-align: center;">
							<h:outputText value="#{rstPar.parcela}"/>
						</rich:column>
						<rich:column style="text-align: center;">
							<h:outputText value="#{rstPar.plano}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.valorBruto}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.valorPagoAdministracao}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.valorLiquido}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.valorPagoAntecipacao}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.valorPago}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.valorTaxaAdministracao}"/>
						</rich:column>
						<rich:column style="text-align: right;">
							<h:outputText value="#{rstPar.valorTaxaAntecipacao}"/>
						</rich:column>
						<rich:column style="text-align: center;">
							<h:outputText value="#{rstPar.descricaoSituacao}"/>
						</rich:column>
						<rich:column rendered="#{loginBean.usuarioVo.estEmpresaVo.flagIntegracao.valor == 'YES'}" style="text-align: left;">
							<h:outputText value="#{rstPar.dadosCliente}"/>
						</rich:column>
						
						<f:facet name="footer">
							<rich:datascroller for="tblDataCupom" maxPages="20"></rich:datascroller>
						</f:facet>
					</rich:dataTable>
				</rich:panel>
			</f:subview>
		</h:panelGroup>
		
		<br/>
		
		<h:panelGroup id="panelGroupDeListagemAgendaFinanceira" rendered="#{crudBean.agendaFinanceira}">
			<f:subview id="viewListagemAgendaFinanceira">
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="#{bundle.lbl_movimentos_vendas_agenda}" />
					</f:facet>
					<rich:dataTable id="tblDataAgendaFinanceira" value="#{crudBean.listaMovimentoRecebimentosAgendaFinanceira}" binding="#{crudBean.tblDataAgendaFinanceira}" var="rst" style="width: 100%;" rowClasses="par,impar">
						<rich:column style="text-align: center;" sortBy="#{rst.dataVenda}">
							<f:facet name="header">
								<h:outputText value="#{bundle.lbl_data_venda}" />
							</f:facet>
							<h:outputText value="#{rst.dataVenda}"/>
						</rich:column>
						<rich:column style="text-align: right;" sortBy="#{rst.tipoPlano}">
							<f:facet name="header">
								<h:outputText value="#{bundle.lbl_plano}" />
							</f:facet>
							<h:outputText value="#{rst.tipoPlano}"/>
						</rich:column>
						<rich:column style="text-align: right;" sortBy="#{rst.quantidade}">
							<f:facet name="header">
								<h:outputText value="#{bundle.lbl_quantidade_parcelas}" />
							</f:facet>
							<h:outputText value="#{rst.quantidade}"/>
						</rich:column>
						<rich:column style="text-align: right;" sortBy="#{rst.valorTotalBruto}">
							<f:facet name="header">
								<h:outputText value="#{bundle.lbl_valor_bruto}" />
							</f:facet>
							<h:outputText value="#{rst.valorTotalBruto}"/>
						</rich:column>
						<rich:column style="text-align: right;" sortBy="#{rst.valorTotalAdministracao}">
							<f:facet name="header">
								<h:outputText value="#{bundle.lbl_valor_administracao}" />
							</f:facet>
							<h:outputText value="#{rst.valorTotalAdministracao}"/>
						</rich:column>
						<rich:column style="text-align: right;" sortBy="#{rst.valorTotalLiquido}">
							<f:facet name="header">
								<h:outputText value="#{bundle.lbl_valor_liquido}" />
							</f:facet>
							<h:outputText value="#{rst.valorTotalLiquido}"/>
						</rich:column>
						<rich:column style="text-align: right;" sortBy="#{rst.valorTotalPago}">
							<f:facet name="header">
								<h:outputText value="#{bundle.lbl_valor_pago}" />
							</f:facet>
							<h:outputText value="#{rst.valorTotalPago}"/>
						</rich:column>
						
						<f:facet name="footer">
                        	<rich:columnGroup rendered="#{crudBean.viewingTotal}">
                        		<rich:column colspan="2" style="text-align: right;">
						     		<h:outputText value="#{bundle.lbl_total}" />
				 		    	</rich:column>
                            	<rich:column style="text-align: right;">
                                	<h:outputText value="#{crudBean.entity.parcela}"/>
                            	</rich:column>
                            	<rich:column style="text-align: right;">
                                	<h:outputText value="#{crudBean.entity.valorBruto}"/>
                            	</rich:column>
                            	<rich:column style="text-align: right;">
                                	<h:outputText value="#{crudBean.entity.valorPagoAdministracao}"/>
                            	</rich:column>
                            	<rich:column style="text-align: right;">
                                	<h:outputText value="#{crudBean.entity.valorLiquido}"/>
                            	</rich:column>
                            	<rich:column style="text-align: right;">
                                	<h:outputText value="#{crudBean.entity.valorPago}"/>
                            	</rich:column>
                        	</rich:columnGroup>
                    	</f:facet>
					</rich:dataTable>
				</rich:panel>
			</f:subview>
		</h:panelGroup>
	</ui:define>
	
	<ui:define name="buttonItens">
	
		<!-- Painel dos botoes de pesquisa -->
		
		<h:panelGroup rendered="#{crudBean.searching}">
			<a4j:commandButton value="#{bundle.lbl_search}" actionListener="#{crudBean.pesquisarMovimentosRecebimentosPorDataCredito}" reRender="tblData,tblDataTotal"/>
			<h:outputText value=" "/>
			<h:commandButton value="#{bundle.lbl_export_planilha}" action="#{crudBean.exportExcel}" reRender="tblData,tblDataTotal"/>
		</h:panelGroup>

		<!-- Painel dos botoes de visualizacao / agenda financeira -->
		<h:panelGroup rendered="#{crudBean.agendaFinanceira}">
			<h:outputText value=" "/>
			<a4j:commandButton value="#{bundle.lbl_voltar}" actionListener="#{crudBean.voltarAgendaToPrincipal}" reRender="formulario, panelTitle" />
			<h:outputText value=" "/>
		</h:panelGroup>
					
		<!-- Painel dos botoes de visualizacao / detalhe das parcelas -->
		<h:panelGroup rendered="#{crudBean.detailParcelas}">
			<h:outputText value=" "/>
			<a4j:commandButton value="#{bundle.lbl_voltar}" actionListener="#{crudBean.voltarViewParcelasToPrincipal}" reRender="formulario, panelTitle" />
		</h:panelGroup>

		<!-- Painel dos botoes de visualizacao -->
		<h:panelGroup rendered="#{crudBean.viewingDetail}">
			<h:outputText value=" "/>
			<a4j:commandButton value="#{bundle.lbl_voltar}" actionListener="#{crudBean.cancelar}" reRender="formulario, panelTitle" />
		</h:panelGroup>
		
	</ui:define>
	
</ui:composition>